<?php
namespace app\common\model;

use think\Model;

class Main extends Model
{
    
    public function bookInfo() {
        return $this->hasOne("Book", "id", "book_id")->field("*");
    }
    
    public function categoryInfo() {
        return $this->hasOne("Category", "id", "category_id")->field("*");
    }

}